package jvDeformation;



import jv.project.PvCameraIf;
import jv.project.PvDisplayIf;
import jv.vecmath.PdVector;

public class ExternJvGrid{
	private PvDisplayIf display;
	private JvGrid jvGrid;
	public ExternJvGrid(PvDisplayIf display, JvGrid jvGrid) {
		this.display = display;
		this.jvGrid = jvGrid;
		init();
	}
	private void init() {
		display.removeGeometries();
		display.selectCamera(PvCameraIf.CAMERA_ORTHO_XY);
		display.setAutoCenter(false);
		display.getCamera().setDist(jvGrid.height);
		PdVector center = jvGrid.elementSet.getCenter();
		display.addGeometry(jvGrid);
		display.getCamera().setInterest(new PdVector(center.getEntry(0), center.getEntry(1),0));
		display.setMajorMode(PvDisplayIf.MODE_PICK);
		display.update(jvGrid);	
		display.getFrame().setVisible(true);
	}
	



}
